package com.woniu.command.customerTypeCommand;

import com.woniu.command.Command;
import com.woniu.command.handler.CustomerTypeCommandHandler;
import com.woniu.outlet.po.CustomerTypePo;
import com.woniu.utils.ApplicationContextHolder;

public class UpdateCustomerTypeCommand implements Command<CustomerTypePo, Integer> {

    private CustomerTypeCommandHandler handler;

    public UpdateCustomerTypeCommand() {
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(CustomerTypeCommandHandler.class);
    }

    @Override
    public Integer execute(CustomerTypePo customerTypePo) {
        return this.handler.updateCustomerType(customerTypePo);
    }
}
